package com.tianqu.tms.entity;

import com.tianqu.tms.core.exception.TmsDaoException;
import com.tianqu.tms.dao.TmsDao;
import com.tianqu.tms.dao.TmsFragileStickerHistoryDao;
import com.tianqu.tms.dto.TmsFragileStickerHistoryDto;

public class TmsFragileStickerHistory {
	private static TmsFragileStickerHistory instance;
	
	private TmsFragileStickerHistory(){}
	
	public static TmsFragileStickerHistory getInstance() throws TmsDaoException {
		instance = new TmsFragileStickerHistory();
		return instance;
}
	
	private int fragileStickerFreePort;

	public int getFragileStickerFreePort() {
		return fragileStickerFreePort;
	}

	public void setFragileStickerFreePort(int fragileStickerFreePort) {
		this.fragileStickerFreePort = fragileStickerFreePort;
	}
	
	
	public int getFragileStickerByMemberId(String memberId) throws TmsDaoException {
		TmsFragileStickerHistoryDao mDao = (TmsFragileStickerHistoryDao) TmsDao.getInstance(TmsDao.TMS_FRAGILESTICKER_HISTORY);
		return mDao.getFragileStickerByMemberId(memberId);
	}
	
	public void insert(TmsFragileStickerHistoryDto dto) throws TmsDaoException {
		TmsFragileStickerHistoryDao mDao = (TmsFragileStickerHistoryDao) TmsDao.getInstance(TmsDao.TMS_FRAGILESTICKER_HISTORY);
		mDao.insert(dto);
	}
}
